home *** CD-ROM | disk | FTP | other *** search
/ Club KidSoft Volume 3 #2 / CKSPCV32.BIN / movies / clubroom.dir / 00006_Script_Clubroom Loop < prev    next >
Text File  |  1995-04-03  |  4KB  |  150 lines

  1. on enterFrame
  2.   global gCurrentButton, gSButton, gSReturn
  3.   global gSTvStart, gSTvStatic, gTvCast
  4.   global gSContest
  5.   global gSArt
  6.   global gSDemo, gDemoCast
  7.   global gSRadio, gRadioCast
  8.   global gSMailBox, gMailBoxCast, gMailBoxUp
  9.   
  10.   if gCurrentButton <> 0 then
  11.     if gCurrentButton = 13 then -- the Mail Box
  12.       NextMailBox
  13.       exit
  14.     else if rollover(gCurrentButton) then
  15.       if gCurrentButton = 2 then
  16.         TvShowStatic
  17.       else if gSButton = gSDemo then
  18.         LemurDance
  19.       else if gSButton = gSRadio then
  20.         RadioDance
  21.       end if
  22.       exit
  23.     end if
  24.     
  25.     if gCurrentButton = 7 then -- roll off the Mail Box
  26.       set gCurrentButton = 0
  27.       set the castNum of sprite gSMailBox to the number of cast "MAILBOX3.PIC"
  28.       updateStage
  29.     else
  30.       OffButton
  31.       StopSound
  32.     end if
  33.   end if
  34.   
  35.   if rollover(2) then -- CLUB TV
  36.     OverButton 2, gSTvStart
  37.     set gTvCast = the castNum of sprite gSTvStart
  38.     --tv
  39.     StartSound "STATIC.AIF"
  40.   else if rollover(3) then -- Contest Central
  41.     StartSound "Blink"
  42.     OverButton 3, gSContest
  43.   else if rollover(4) then -- CLUB ART
  44.     OverButton 4, gSArt
  45.     StartSound "Bweep"
  46.   else if rollover(5) then -- Demo Lemur
  47.     OverButton 5, gSDemo
  48.     PuppetSound "LEMUR2.AIF"
  49.     set gDemoCast = the castNum of sprite gSDemo
  50.   else if rollover (6) then
  51.     OverButton 6, gSRadio
  52.     set gRadioCast = the castNum of sprite gSRadio
  53.     -- radio  
  54.     if(random(2) = 1) then
  55.       StartSound "TUNING.AIF"
  56.     else
  57.       StartSound "TAPECUE.AIF"
  58.     end if
  59.     
  60.   else if gMailBoxUp = true and rollover(7) then
  61.     set gCurrentButton = 7
  62.     set gSButton = gSMailBox
  63.     StartSound "Page Flip"
  64.     DownButton
  65.     
  66.   else if rollover(8) then -- Super Store
  67.     global gSStore
  68.     OverButton 8, gSStore
  69.     StartSound "Bweep"
  70.     
  71.   else if rollover(10) then -- Return 
  72.     OverButton 10, gSReturn
  73.   end if
  74.   
  75.   -- check the mailbox time
  76.   global gMailBoxTimer, gSMailBoxButton
  77.   if (gMailBoxUp = false) and (the timer > gMailBoxTimer) then
  78.     StartSound "BUBBLES.AIF"
  79.     OverButton 13, gSMailBox
  80.     set gMailBoxCast = the castNum of sprite gSMailBox
  81.     set the visible of sprite gSMailBoxButton to true
  82.     
  83.   end if
  84.   
  85. end
  86.  
  87. ----------------------------------------------
  88. -- Animate the tv static
  89. ----------------------------------------------
  90. on TvShowStatic
  91.   global gStvStart, gSTvStatic,  gTvStaticCount, gTvCast
  92.   global gSButton
  93.   
  94.   -- transition to the bouncing TV
  95.   if gTvCast = the number of cast "TVFUZZ4" then
  96.     set the visible of sprite gSTvStart to false
  97.     set the puppet of sprite gSTvStart to false
  98.     set the visible of sprite gSTvStatic to true
  99.     set the puppet of sprite gSTvStatic to true
  100.     set gTvCast = the number of cast "TVFUZZ5"
  101.     set gSButton = gSTvStatic
  102.   else  
  103.     set gTvCast = gTvCast + 1
  104.     if gTvCast > the number of cast "TVFUZZ7" then
  105.       set gTvCast = the number of cast "TVFUZZ5"
  106.     end if
  107.     set the castNum of sprite gSButton to gTvCast
  108.   end if
  109.   
  110.   updateStage
  111. end
  112. ----------------------------------------------
  113. -- Animate the demo Lemur
  114. ----------------------------------------------
  115. on LemurDance
  116.   global gSDemo,  gDemoCast
  117.   
  118.   set gDemoCast = gDemoCast + 1
  119.   if gDemoCast > the number of cast "LEMUR9.PIC" then
  120.     set gDemoCast = the number of cast "LEMUR1.PIC"
  121.   end if
  122.   set the castNum of sprite gSDemo  to gDemoCast
  123.   
  124.   updateStage
  125. end
  126.  
  127.  
  128. ----------------------------------------------
  129. -- Next Mail Box
  130. ----------------------------------------------
  131. on NextMailBox
  132.   global gSMailBox, gMailBoxTimer, gMailBoxUp, gMailBoxCast
  133.   global gCurrentButton, gSButton
  134.   
  135.   if gMailBoxCast = the number of cast "MAILBOX3.PIC" then
  136.     set gCurrentButton = 0
  137.     set gSButton = 0
  138.     set gMailBoxUp = true
  139.   else
  140.     set gMailBoxCast = gMailBoxCast + 1
  141.     set the castNum of sprite gSMailBox  to gMailBoxCast
  142.   end if
  143.   
  144.   updateStage
  145. end
  146.  
  147. on exitFrame
  148.   CheckBackgroundSound 
  149.   go to the frame
  150. end